package com.wuliang.blog.vo;

import com.google.gson.annotations.Expose;
import com.wuliang.blog.core.basic.BaseVo;
import com.wuliang.blog.entities.Article;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.jpa.domain.Specification;

import javax.persistence.Column;

@Data
@Builder
@EqualsAndHashCode(callSuper = true)
public class ArticleVo extends BaseVo<Article> {

    @Expose
    @ApiModelProperty(name = "articleContent", value = "文章内容", dataType = "string")
    private String articleContent;

    @Expose
    @ApiModelProperty(name = "articleTitle", value = "文章标题", dataType = "string")
    private String articleTitle = "";

    @Expose
    @ApiModelProperty(name = "classificationId", value = "所属分类ID", dataType = "int")
    private Integer classificationId = 0;

    @Expose
    @ApiModelProperty(name = "", value = "", dataType = "")
    private Integer articleId;

    @Override
    public Specification<Article> toSpecification() {
        return super.toSpecification();
    }
}
